/**
 The MIT License

Copyright (c) <2011> <JPACHUBE Team>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
 */
package com.pachube.http.client;

import java.util.Hashtable;

/**
 * The Class HttpResponse.
 */
public class HttpResponse {

    /** Body of the Response. */
    private String Body;

    /**
     * Header information, there is a Item called "Status" which is the HTTP
     * status code of the Response.
     */
    private Hashtable<String, String> header;

    /**
     * Constructor.
     */
    public HttpResponse() {
        this.header = new Hashtable<String, String>();
    }

    /**
     * Add an item to the Response header, this method is intended only to be
     * used by the HttpClient.
     * 
     * @param Key the key
     * @param Value the value
     */
    public void addHeaderItem(String Key, String Value) {
        this.header.put(Key, Value);
    }

    /**
     * Get an item from the Response header, there is an Item called "Status"
     * which is the HTTP stutus code of the Response.
     * 
     * @param Key the key
     * @return the header item
     */
    public String getHeaderItem(String Key) {
        return this.header.get(Key);
    }

    /**
     * Gets the body.
     * 
     * @return the body
     */
    public String getBody() {
        return this.Body;
    }

    /**
     * Sets the body.
     * 
     * @param body the body to set
     */
    public void setBody(String body) {
        this.Body = body;
    }

}
